package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@Schema
@Data
public class UnitConvRateDto {

    @Schema(description = "id",requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "id必填", groups={GroupEdit.class})
    private Integer id;

    @Schema(description = "原单位", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,原单位不能为空", groups={GroupAdd.class, GroupEdit.class})
    private String unitCode;
    @Schema(description = "目标单位", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,目标单位不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String targetUnitCode;
    @Schema(description = "原单位基数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "参数错误,原单位基数不能为空", groups={GroupAdd.class,GroupEdit.class})
    private Integer unitCnum;
    @Schema(description = "目标单位换算值", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "参数错误,目标单位换算值不能为空", groups={GroupAdd.class,GroupEdit.class})
    private java.math.BigDecimal targetUnitRate;

}
